import request from '@/utils/request'

export function getWebconfig(data) {
  return request({
    url: `/api/initial/webconfig`,
    method: 'post',
    data
  })
}

export function dashboard(params) {
  return request({
    url: `/api/initial/dashboard`,
    method: 'get',
    params
  })
}

export function soils(params) {
  return request({
    url: '/idata/initial/soils',
    method: 'get',
    params
  })
}

export function crops(params) {
  return request({
    url: '/idata/initial/crops',
    method: 'get',
    params
  })
}

export function fields(params) {
  return request({
    url: '/idata/initial/fields',
    method: 'get',
    params
  })
}

export function plantDetails(params) {
  return request({
    url: '/idata/initial/plantDetails',
    method: 'get',
    params
  })
}

export function rtuPorts(serialno) {
  return request({
    url: '/idata/initial/rtuPorts',
    method: 'get',
    params: { serialno }
  })
}

export function cropGrowthes(params) {
  return request({
    url: '/idata/initial/cropGrowthes',
    method: 'get',
    params
  })
}

export function cropGrowthesStd(params) {
  return request({
    url: '/idata/initial/cropGrowthesStd',
    method: 'get',
    params
  })
}
